﻿Public Class TFontSettings
    Private _FontName As String
    Private _FontSize As Integer
    Private _FontBold As Boolean
    Private _FontItalic As Boolean
    Private _ForeColor As Color
    Private _BackColor As Color
    Public Property Font() As Font
        Get
            Dim fs As FontStyle = FontStyle.Regular
            If _FontBold Then
                fs = fs Or FontStyle.Bold
            End If
            If _FontItalic Then
                fs = fs Or FontStyle.Italic
            End If
            Return New Font(_FontName, _FontSize, fs)
        End Get
        Set(ByVal value As Font)
            _FontBold = value.Bold
            _FontItalic = value.Italic
            _FontName = value.Name
            _FontSize = value.Size
        End Set
    End Property
    Public Property FontName() As String
        Get
            Return _FontName
        End Get
        Set(ByVal value As String)
            _FontName = value
        End Set
    End Property
    Public Property FontSize() As Integer
        Get
            Return _FontSize
        End Get
        Set(ByVal value As Integer)
            _FontSize = value
        End Set
    End Property
    Public Property FontBold() As Boolean
        Get
            Return _FontBold
        End Get
        Set(ByVal value As Boolean)
            _FontBold = value
        End Set
    End Property
    Public Property FontItalic() As Boolean
        Get
            Return _FontItalic
        End Get
        Set(ByVal value As Boolean)
            _FontItalic = value
        End Set
    End Property
    Public Property ForeColor() As Color
        Get
            Return _ForeColor
        End Get
        Set(ByVal value As Color)
            _ForeColor = value
        End Set
    End Property
    Public Property BackColor() As Color
        Get
            Return _BackColor
        End Get
        Set(ByVal value As Color)
            _BackColor = value
        End Set
    End Property
End Class
